class UserSessionsController < ApplicationController

  def new
    @user_session = UserSession.new
    render :layout => false
  end

  def create
    @user_session = UserSession.new params[:user_session]
    if @user_session.save
      flash[:notice] = 'sign in successful!'
      redirect_to root_path :layout => false
    else
      render 'new',:layout => false
    end
  end

  def destroy
    current_user_session.destroy
    redirect_to login_path :layout => false
  end
end
